/*
 * Alloy Analyzer
 * Copyright (c) 2002 Massachusetts Institute of Technology
 *
 * The Alloy Analyzer is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * The Alloy Analyzer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with the Alloy Analyzer; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package alloy.viz.gui;


import javax.swing.ButtonModel;

/**
 * TristateButtonModel extends ButtonModel to provide a third state (for components which can
 * render it).
 *
 * original author: btsang from princeton.edu
 */
public abstract interface TristateButtonModel extends ButtonModel
{
    /**
     * Returns true if the button is in tristate.  If this returns true, isSelected() should also
     * return true.
     *
     * @return True iff the button is in tristate.
     */
    public abstract boolean isTristate();

    /**
     * Sets whether or not the button is in tristate.  If true is passed, setSelected(true)
     * would be called first.
     *
     * @param tristate Wheter or not the button should be in tristate.
     */
    public abstract void setTristate(boolean tristate);
}
